package com.dynabook.ems.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dynabook.ems.mapper.EmsAbnormalMapper;
import com.dynabook.ems.model.entity.EmsAbnormal;
import com.dynabook.ems.service.EmsAbnormalService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author tester
 * @description 针对表【ems_abnormal】的数据库操作Service实现
 * @createDate 2025-06-09 13:49:43
 */
@Service
public class EmsAbnormalServiceImpl extends ServiceImpl<EmsAbnormalMapper, EmsAbnormal>
        implements EmsAbnormalService {

    @Override
    public List<EmsAbnormal> getAbnormalList() {
        QueryWrapper<EmsAbnormal> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("status", 0);
        return this.list(queryWrapper);
    }

    @Override
    public Boolean saveAbnormal(EmsAbnormal emsAbnormal) {
        return  this.saveOrUpdate(emsAbnormal);
    }
}




